//
//  ErrorInfo.m
//  Favor
//
//  Created by 郑宇强 on 15/12/30.
//  Copyright © 2015年 nbxuanma. All rights reserved.
//

#import "ErrorInfo.h"
@implementation ErrorInfo
+ (void)SaveErrorCodeWithStatus:(NSInteger)Status AndResult:(NSString *)Result {
    [[NSUserDefaults standardUserDefaults]setObject:Result forKey:[NSString stringWithFormat:@"%ld",(long)Status]];
}
+ (NSString *)ErrorInfoWithStatus:(NSInteger)Status {
    return [[NSUserDefaults standardUserDefaults]objectForKey:[NSString stringWithFormat:@"%ld",(long)Status]];
}

+ (void)ShowErrorWithMessage:(NSInteger)Status {
//     [MBProgressHUD showError:[[NSUserDefaults standardUserDefaults]objectForKey:[NSString stringWithFormat:@"%ld",(long)Status]]];
    [SVProgressHUD showErrorWithStatus:[[NSUserDefaults standardUserDefaults]objectForKey:[NSString stringWithFormat:@"%ld",(long)Status]]];
    if(Status == 40001){
//        [LPUserDefault removeObjectForKey:@"token"];
//        
//        TabBarViewController *tabbar = (TabBarViewController *)[UIApplication sharedApplication].keyWindow.rootViewController;
//        UINavigationController *navi = tabbar.selectedViewController;
////        RelationPhoneViewController *login = [[RelationPhoneViewController alloc]init];
////        [navi pushViewController:login animated:YES];
//        LPLoginViewController * login = [[LPLoginViewController alloc]init];
//        [navi presentViewController:login animated:YES completion:nil];
    }
}
@end
